package org.fxcontainer.commands
{
	import com.developmentarc.core.actions.commands.AbstractCommand;
	
	public class ControlInvocationCommand extends AbstractCommand
	{
		
		/**
		 * The control invocation command type.
		 */
		static public const CTRL_INVOKE_CMD:String = "org.fxcontainer.commands.ControlInvocationCommand.CTRL_INVOKE_CMD";
		
		/**
		 * The page name. 
		 */
		private var _pageName:String;
		
		/**
		 * The control name. 
		 */
		private var _controlName:String;
		
		/**
		 * The method name. 
		 */
		private var _methodName:String;
		
		/**
		 * The method arguments. 
		 */
		private var _methodArgs:Array;
		
		/**
		 * The control invocation command constructor.
		 * @param pageName the page name to invoke control on
		 * @param controlName the control to invoke
		 * @param type the command type, by default is <code>CTRL_INVOKE</code> type
		 */
		public function ControlInvocationCommand(_pageName:String, _controlName:String, type:String=ControlInvocationCommand.CTRL_INVOKE_CMD)
		{
			super(type);
			this._pageName = _pageName;
			this._controlName = _controlName;
		}
		
		public function get pageName():String
		{
			return this._pageName;
		}
		
		public function get controlName():String
		{
			return this._controlName;
		}
		
		public function set methodName(methodName:String):void
		{
			this._methodName = methodName;
		}
		
		public function get methodName():String
		{
			return this._methodName;
		}
		
		public function set methodArgs(methodArgs:Array):void
		{
			this._methodArgs = methodArgs;
		}
		
		public function get methodArgs():Array
		{
			return this._methodArgs;
		}
	}
}